{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "<p align=\"center\">\n",
    "    <img src=\"https://github.com/GeostatsGuy/GeostatsPy/blob/master/TCG_color_logo.png?raw=true\" width=\"220\" height=\"240\" />\n",
    "\n",
    "</p>\n",
    "\n",
    "## Data Analytics \n",
    "\n",
    "### Confidence Intervals and Hypothesis Testing for Data Analytics in Python \n",
    "\n",
    "#### Michael Pyrcz, Associate Professor, University of Texas at Austin \n",
    "\n",
    "##### [Twitter](https://twitter.com/geostatsguy) | [GitHub](https://github.com/GeostatsGuy) | [Website](http://michaelpyrcz.com) | [GoogleScholar](https://scholar.google.com/citations?user=QVZ20eQAAAAJ&hl=en&oi=ao) | [Book](https://www.amazon.com/Geostatistical-Reservoir-Modeling-Michael-Pyrcz/dp/0199731446) | [YouTube](https://www.youtube.com/channel/UCLqEr-xV-ceHdXXXrTId5ig)  | [LinkedIn](https://www.linkedin.com/in/michael-pyrcz-61a648a1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### Reporting Uncertainty and Significance\n",
    "\n",
    "With confidence intervals and hypothesis testing we have the opportunity to report uncertainty and to report significance in our statistics. These methods are based on standard methods with their associated limitations and assumptions. For additional learning content to support learning about confidence intervals see [Confidence Intervals Lecture](https://youtu.be/oaXCcTWcU04) for more details and the [Confidence Intervals Interactive Demonstration](https://github.com/GeostatsGuy/PythonNumericalDemos/blob/master/Interactive_Confidence_Interval.ipynb) to play with and observe confidence intervals in real-time! For more information about hypothesis testing see [Hypothesis Testing Lecture](https://youtu.be/rvt9UM148tQ) and [Hypothesis Testing Interactive Demonstration](https://github.com/GeostatsGuy/PythonNumericalDemos/blob/master/Interactive_Hypothesis_Testing.ipynb).\n",
    "\n",
    "Also, for more information about statistical bootstrap see the [Bootstrap Lecture](https://youtu.be/oaXCcTWcU04) and [Bootstrap Workflow](https://git.io/fhgUW) for a general, empirical approach to assess uncertainty in statistics and models and [Bootstrap Interactive Demonstration](https://github.com/GeostatsGuy/PythonNumericalDemos/blob/master/Interactive_Bootstrap_Simple.ipynb).\n",
    "\n",
    "This is a tutorial / demonstration of **Confidence Intervals and Hypothesis Testing in Python** for data analytics and data science workflows.  In Python, the SciPy package, specifically the [SciPy Stats Functions](https://docs.scipy.org/doc/scipy/reference/stats.html) provides excellent statistics tools. \n",
    "\n",
    "##### More Comfortable in Excel or R?\n",
    "\n",
    "I have previously provided these examples worked out by-hand in [Excel](https://github.com/GeostatsGuy/LectureExercises/blob/master/Lecture7_CI_Hypoth_eg_R.xlsx) and also in [R](https://github.com/GeostatsGuy/LectureExercises/blob/master/Lecture7_CI_Hypoth_eg.R).  In all cases, I use the same [dataset](https://git.io/fxLAt) available as a comma delimited file in my [GeoDataSets](https://github.com/GeostatsGuy/GeoDataSets) repository. Feel free to compare the workflows and results as a bridge to working in Python.  \n",
    "\n",
    "##### Topics Covered\n",
    "\n",
    "This tutorial, well-documented workflow, includes basic, typical confidence interval and hypothesis testing methods that would commonly be required for Engineers and Geoscientists including:\n",
    "\n",
    "1. Student-t confidence interval for the mean\n",
    "2. Student-t hypothesis test for difference in means (pooled variance)\n",
    "3. Student-t hypothesis test for difference in means (difference variances), Welch's t Test\n",
    "3. F-distribution hypothesis test for difference in variances \n",
    "\n",
    "#### Workflow Goal\n",
    "\n",
    "0. Introduction to Python in Jupyter including setting a working directory, loading data into a Pandas DataFrame.\n",
    "1. Learn the basics for working with confidence intervals and hypothesis testing in Python.  \n",
    "2. Demonstrate the efficiency of using Python and SciPy package for statistical analysis.\n",
    "3. Learn how to quantify uncertainty and significance in samples.\n",
    "\n",
    "#### Objective \n",
    "\n",
    "I want to provide hands-on experience with building subsurface modeling workflows. Python provides an excellent vehicle to accomplish this. I have coded a package called GeostatsPy with GSLIB: Geostatistical Library (Deutsch and Journel, 1998) functionality that provides basic building blocks for building subsurface modeling workflows. \n",
    "\n",
    "The objective is to remove the hurdles of data science modeling workflow construction by providing building blocks and sufficient examples. My courses are not a coding classes per se, but we need the ability to 'script' workflows working with numerical methods.    \n",
    "\n",
    "#### Getting Started\n",
    "\n",
    "Here's the steps to get setup in Python with the GeostatsPy package:\n",
    "\n",
    "1. Install Anaconda 3 on your machine (https://www.anaconda.com/download/). \n",
    "2. From Anaconda Navigator (within Anaconda3 group), go to the environment tab, click on base (root) green arrow and open a terminal. \n",
    "3. In the terminal type: pip install geostatspy. \n",
    "4. Open Jupyter and in the top block get started by copy and pasting the code block below from this Jupyter Notebook to start using the geostatspy functionality. \n",
    "\n",
    "You will need to copy the data file to your working directory.  They are available here:\n",
    "\n",
    "* Tabular data - PorositySample2Units.csv at https://git.io/fhrM8\n",
    "\n",
    "There are exampled below with these functions. You can go here to see a list of the available functions, https://git.io/fh4eX, other example workflows and source code. \n",
    "\n",
    "#### Load the required libraries\n",
    "\n",
    "The following code loads the required libraries."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import geostatspy.GSLIB as GSLIB                       # GSLIB utilies, visualization and wrapper\n",
    "import geostatspy.geostats as geostats                 # GSLIB methods convert to Python     "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We will also need some standard packages. These should have been installed with Anaconda 3."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os                                              # to set current working directory \n",
    "import numpy as np                                     # arrays and matrix math\n",
    "import scipy.stats as st                               # statistical methods\n",
    "import pandas as pd                                    # DataFrames\n",
    "import matplotlib.pyplot as plt                        # plotting\n",
    "from matplotlib.ticker import (MultipleLocator, AutoMinorLocator) # control of axes ticks\n",
    "plt.rc('axes', axisbelow=True)                         # set axes and grids in the background for all plots"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If you get a package import error, you may have to first install some of these packages. This can usually be accomplished by opening up a command window on Windows and then typing 'python -m pip install [package-name]'. More assistance is available with the respective package docs.  \n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Set the working directory\n",
    "\n",
    "I always like to do this so I don't lose files and to simplify subsequent read and writes (avoid including the full address each time).  Also, in this case make sure to place the required (see below) data file in this directory.  When we are done with this tutorial we will write our new dataset back to this directory.  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "#os.chdir(\"C:\\PGE383\")                                  # set the working directory"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Loading Data\n",
    "\n",
    "Let's load the provided dataset. 'PorositySamples2Units.csv' is available at https://github.com/GeostatsGuy/GeoDataSets. It is a comma delimited file with 20 porosity measures from 2 rock units from the subsurface, porosity (as a fraction). We load it with the pandas 'read_csv' function into a data frame we called 'df' and then preview it by printing a slice and by utilizing the 'head' DataFrame member function (with a nice and clean format, see below).\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>X1</th>\n",
       "      <th>X2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.21</td>\n",
       "      <td>0.20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.17</td>\n",
       "      <td>0.26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.15</td>\n",
       "      <td>0.20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.20</td>\n",
       "      <td>0.19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.19</td>\n",
       "      <td>0.13</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     X1    X2\n",
       "0  0.21  0.20\n",
       "1  0.17  0.26\n",
       "2  0.15  0.20\n",
       "3  0.20  0.19\n",
       "4  0.19  0.13"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#df = pd.read_csv(\"PorositySample2Units.csv\")           # read a .csv file in as a DataFrame\n",
    "df = pd.read_csv(\"https://raw.githubusercontent.com/GeostatsGuy/GeoDataSets/master/PorositySample2Units.csv\") # load data from Dr.Pyrcz's GitHub repository\n",
    "#print(df.iloc[0:5,:])                                 # display first 4 samples in the table as a preview\n",
    "df.head()                                              # we could also use this command for a table preview "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Checking Data Summary Statistics\n",
    "\n",
    "It is useful to review the summary statistics of our loaded DataFrame.  That can be accomplished with the 'describe' DataFrame member function.  We transpose to switch the axes for ease of visualization."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>X1</th>\n",
       "      <td>20.0</td>\n",
       "      <td>0.1645</td>\n",
       "      <td>0.027810</td>\n",
       "      <td>0.11</td>\n",
       "      <td>0.1500</td>\n",
       "      <td>0.17</td>\n",
       "      <td>0.19</td>\n",
       "      <td>0.21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>X2</th>\n",
       "      <td>20.0</td>\n",
       "      <td>0.2000</td>\n",
       "      <td>0.045422</td>\n",
       "      <td>0.11</td>\n",
       "      <td>0.1675</td>\n",
       "      <td>0.20</td>\n",
       "      <td>0.23</td>\n",
       "      <td>0.30</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    count    mean       std   min     25%   50%   75%   max\n",
       "X1   20.0  0.1645  0.027810  0.11  0.1500  0.17  0.19  0.21\n",
       "X2   20.0  0.2000  0.045422  0.11  0.1675  0.20  0.23  0.30"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe().transpose()                              # visualize summary statistics "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Here we extract the X1 and X2 unit porosity samples from the DataFrame into separate arrays called 'Por1' and 'Por2' for convenience."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "por1 = df['X1'].values                                 # extract well 1 porosity to a ndarray\n",
    "por2 = df['X2'].values                                 # extract well 2 porosity to a ndarray          "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Visualizing the Data Distributions\n",
    "\n",
    "We should first visualize the distributions.  It is convenient to plot the distributions on top of each other.  \n",
    "\n",
    "* we compare the histograms and cumulative distribution functions (CDFs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA5gAAAGaCAYAAABqn+yfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nOzdfZxdZXno/d+VSUImQhKB4AhBgg7lgBFF0UqiaAsiKiHHnvqC9d0Cj22FArUF9fiGT9tTtQfbY2sQERHFglXHKK1YX0BPIsiL5S36gBowgQoEYwjMZJjM9fyx9w6TycyePcnae+298/t+Pvlk1lrXutd1DzPcufZa674jM5EkSZIkaXfNKDsBSZIkSVJ3sMCUJEmSJBXCAlOSJEmSVAgLTEmSJElSISwwJUmSJEmFsMCUJEmSJBXCAlOapoi4IyJeWnYe40XEByPi8urXiyMiI2Jm2XmNV82rv+w8JEntw7F19zi2qp1YYKqjRMS6iBiMiC0R8euI+GxE7N3KHDLzmZn5/Wo+2wee6YqIUyPiznH7vj3JvvN2OeGJr/1nEXFjRGyNiEuLbHt3RMTHIuKuiHgkIn4aEW8uOydJ6naOrcVwbJUqLDDViZZn5t7Ac4HnA++bbgNt8unjtcAREbEQtuf0bGDuuH3HAtcVfO37gI8AlxTc7u56FFgOzAfeAnwiIpaWm5Ik7REcW3efY6uEBaY6WGZuAP4NWAIQEQdGxNcj4uGIuDsiTqvFVj8N/XJEXB4Rm4G3RsReEXFhRNxX/XNhROxVjd8/Ir4REZuq7f0gImZUj62LiBMi4iTgPcDrqp/6/mdEvCYibhqbZ0ScGxFfmyD/+4BfAMdVdz0XuIPK4Dh23wzgxjF9/NeIeDAifhkRZ+7i9+4rmfk1YONUsRHxjIj4bkRsjIiHIuILEbFgzPF1EfEXEXFrRPw2Iv4lIuaMOf7uiLi/+j1++xR5fSAzf5qZo5l5PfADKv8IkCS1gGOrY6u0uyww1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2+OOPs379eoaGhgCojLVPPDM/mSLjGm0LYNGiRaxdW/+p4F3Jbc6cOSxatIhZs2ZNmYMkSfW0w9g6nbhmja2A46skFaCjCsz169ezzz77sHjxYiKC0dFRAGbMqP8qaZFxjbYFsGnTJhYsWFBobhHBxo0bWb9+PYceeuiUOUiSVE87jK3TiWvG2Dpjxgwy0/FVkgrQzEl+Cjc0NMR+++3X0N3DbhUR7Lfffts/aZYkaXc4tlY4vkpSMdrmDmZELAeW17b7+vomi2tVSm3L74EkqUiOKxV+HyRp97VNgZmZq4BVte3+/v7T6sUfc8wxTcnjhhtumPTY2WefzdOe9jTOOussAF7+8pdz8MEHc/HFFwNw7rnnctBBB3HOOedM2sbee+/Nli1bWLduHSeffDK33nrrTjEnnXQSP/rRj3jRi17EN77xjd3skSRJjWlWgbVt27ZJj5199tkccsghnHnmmYBjqyR1urYpMHfJFC/5T9sRR9Q9vHTpUq688krOOussRkdHeeihh9i8efP246tXr+bCCy/c7TTe/e5389hjj7Fy5crdbkuSpHa2dOlSrrrqKs4880zHVknqAp1dYAI/PuIIpvq8Nat/14s7poFiddmyZZx99tkA3HHHHSxZsoT777+f3/zmN8ydO5e1a9dy9NFHA/DRj36UK664gpGREV796lfzoQ99aOrOVB1//PF8//vfbzhekqQi5dQhDWnkfqhjqyR1l44vMFvpwAMPZObMmdx7772sXr2aY489lg0bNrBmzRrmz5/PUUcdxezZs7nmmmu46667+M53vsP8+fM55ZRTuO666zjuuOPK7oIkSW3FsVWSuosF5jQtXbqU1atXs3r1as455xw2bNjA6tWrmT9/PkuXLgXgmmuu4ZprrmHNmjX09PSwZcsW7rrrLgdBSZImsGzZMlavXs2aNWs499xzHVslqYNZYE7T0qVLWbNmDbfddhtLlizh4IMP5uMf/zjz5s3j7W9/O1BZuPn888/nda973ZRrdUmStKerja233367Y6skdbiOWgezHSxdupRvfvOb7LvvvvT09LDvvvuyadMm1qxZw7HHHgtUZsC75JJL2LJlCwAbNmzggQceKDNtSZLa1rJlyxxbJal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U8AdwDc7xOyUtFd0vjYl37cLgYeB48g+Br8j1+duLrqe6rH4X0RM7msXT59L9gUe37OJmZnNAq6tU3NttaHndzDNnu5XwKmS5knaH3gX2TUkrW4DXi9pRNIc4HTgl5JGgL0i4gfAZ4CXtWn7b+CAyY2IuA1YAJwBfKdDv+4kuzakiAOBh1LBPBOYk26/GThL6Vv2JM1v15/pcixw/KOB9QX7amZmw8+1dZocCxzftdUawyeYZjkRsZbsmo4/kBWBqyLiT23iHgIuBlYBtwNrI+InwOHAaPp40PIU0+pK4OeSVuVu+x7ZN8Q91qFrPwPeUDCNrwHLJK0mK0jbU59vBFYAY6l/H0/xy4ErJr+IoECO03k1cEvBvpqZ2ZBzbXVttdnFP1NiVgOSbgAuj4hfdLj/OcA1EfHmwfasO5IWAxdFxJlV98XMzGY311azavgdTLMKSTpI0l1k16y0LYCw+xXPryv9GHSNjZB9fMnMzKwSrq1m1fI7mGZmZmZmZlYKv4NpZmZmZmZmpfAJppmZmZmZmZXCJ5hmZmZmZmZWCp9gmpmZmZmZWSl8gmlmZmZmZmal8AmmmZmZmZmZleL/BPXK8nye7ncAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.subplot(121)\n",
    "plt.hist(por1, facecolor='red',bins=np.linspace(0.0,0.4,20),alpha=0.8,density=False,edgecolor='black',linewidth=2,label='Well 1')\n",
    "plt.hist(por2, facecolor='gold',bins=np.linspace(0.0,0.4,20),alpha=0.6,density=False,edgecolor='black',linewidth=2,label = 'Well 2')\n",
    "plt.xlim([0.0,0.4]); plt.ylim([0,8.0])\n",
    "plt.xlabel('Porosity (fraction)'); plt.ylabel('Frequency'); plt.title('Porosity Well 1 and 2')\n",
    "plt.legend(loc='upper left')\n",
    "plt.gca().grid(True, which='major',axis='both',linewidth = 1.0); plt.gca().grid(True, which='minor',axis='x',linewidth = 0.2) # add y grids\n",
    "plt.gca().tick_params(which='major',length=7); plt.gca().tick_params(which='minor', length=4)\n",
    "plt.gca().xaxis.set_minor_locator(AutoMinorLocator()); plt.gca().yaxis.set_minor_locator(AutoMinorLocator()) # turn on minor ticks\n",
    "\n",
    "plt.subplot(122)\n",
    "plt.hist(por1, facecolor='red',bins=np.linspace(0.0,0.4,50),histtype=\"stepfilled\",alpha=1.0,density=True,cumulative=True,edgecolor='black',linewidth=2,label='Well 1')\n",
    "plt.hist(por2, facecolor='gold',bins=np.linspace(0.0,0.4,50),histtype=\"stepfilled\",alpha=1.0,density=True,cumulative=True,edgecolor='black',linewidth=2,label='Well 2')\n",
    "plt.xlim([0.0,0.4]); plt.ylim([0,1.0])\n",
    "plt.xlabel('Porosity (fraction)'); plt.ylabel('Cumulative Probability'); plt.title('Porosity Well 1 and 2')\n",
    "plt.legend(loc='upper left')\n",
    "plt.grid(True, which='major',linewidth = 1.0); plt.grid(True, which='minor',linewidth = 0.2) # add y grids\n",
    "plt.gca().tick_params(which='major',length=7); plt.gca().tick_params(which='minor', length=4)\n",
    "plt.gca().xaxis.set_minor_locator(AutoMinorLocator()); plt.gca().yaxis.set_minor_locator(AutoMinorLocator()) # turn on minor ticks\n",
    "\n",
    "plt.subplots_adjust(left=0.0, bottom=0.0, right=2.0, top=1.2, wspace=0.2, hspace=0.3)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The histogram and cumulative distribution functions indicate the porosity distributions in both wells 1 and 2. Ocular inspection does indicate: \n",
    "\n",
    "1. not a lot of samples are available for each (n=20) \n",
    "2. the distributions look different\n",
    "\n",
    "Let's use statistics to learn more about the subsurface from these two wells."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Confidence Intervals\n",
    "\n",
    "Let's first demonstrate the calculation of the confidence interval for the sample mean at a 95% confidence level.  We interpret the confidence interval as the interval over which there is a 95% confidence that it contains the true population mean. We use the student's t distribution as we assume we do not know the variance and the sample size is small. \n",
    "\n",
    "\\begin{equation}\n",
    "x̅ \\pm t_{\\frac{\\alpha}{2},n-1} \\times \\frac {s}{\\sqrt{n}} \n",
    "\\end{equation}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The confidence interval for the Well 1 mean porosity is 0.164 +/- 0.013, with a range of 0.151, 0.178\n",
      "The confidence interval for the Well 2 mean porosity is 0.2 +/- 0.021, with a range of 0.179, 0.221\n"
     ]
    }
   ],
   "source": [
    "ci_95_por1 = st.t.interval(0.95, len(df)-1, loc=np.mean(por1), scale=st.sem(por1))\n",
    "print('The confidence interval for the Well 1 mean porosity is ' + str(round(np.mean(por1),3)) + ' +/- ' + str(round(ci_95_por1[1]-np.mean(por1),3))\n",
    "      + ', with a range of ' + str(round(ci_95_por1[0],3)) + ', ' + str(round(ci_95_por1[1],3)))\n",
    "\n",
    "ci_95_por2 = st.t.interval(0.95, len(df)-1, loc=np.mean(por2), scale=st.sem(por2))\n",
    "print('The confidence interval for the Well 2 mean porosity is ' + str(round(np.mean(por2),3)) + ' +/- ' + str(round(ci_95_por2[1]-np.mean(por2),3))\n",
    "      + ', with a range of ' + str(round(ci_95_por2[0],3)) + ', ' + str(round(ci_95_por2[1],3)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Using Confidence Intervals to Build an Uncertainty Model\n",
    "\n",
    "The confidence interval for the mean could be applied directly as an uncertainty model! The uncertainty in mean porosity at each well could be applied to calculate the uncertainty in the mean porosity applied to model porosity around the two wells. This method would account for the limited number of porosity samples available. If more porosity samples we available then this uncertainty would decrease (note the $\\sqrt{n}$ in the denominator of the confidence interval in the mean calculation above.\n",
    "\n",
    "One possible work flow would be to apply the affine correction from the *GeostatsPy* package to formulate a the P5 and P95 porosity distributions for porosity in each well. Note, these distribution scenarios are based only on uncertainty in the mean porosity and assumes the distribution tails are not anchored (are free to shift)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA54AAAGWCAYAAAAQQ1yjAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nOzdeZhkdXXw8e+ZZhkYmkEWFRgGBuWdDDtYuERZElwQFWOiEYQYBMEoZlxAg5q4L4mYR0FQBDWuyOLrggYVExzQSIQGRwy0vAyowwBRZHF6lAam67x/1O2hpqeX6q663bV8P8/TT1fd+7u/e35V3ffUuXWXyEwkSZIkSSrLvLkOQJIkSZLU3Sw8JUmSJEmlsvCUJEmSJJXKwlOSJEmSVCoLT0mSJElSqSw8JUmSJEmlsvBUaSLi5og4YhbX9/aI+HQL+1sXEXsWjz8XEe9vYd/nR8Q/taq/bhARi4vXvG+uY2m1iPhVRDy7ePzuiPjSXMckqXOZXyft2/w6hvlV7cLCs0sV/4gPFRua30TEv0XENrMZQ2buk5krinia2hhExIqIGI6IoYhYGxE3RMSZEbFl3fo+mJmvbrCvKdtl5jaZecdMY65b34kR8aMxff9dZr6v2b7HWdcmCTwi9oiIjIjNWr2+KWLZZNyTyczVxWs+0kDfpY4pIr4XEW+te75rsb7xpj2xhevdIiK+Wvz/5mx+sJTUGPPrlH2ZX0tmfp3Rep8eEd+PiPsj4t6IuCwidm5V/2qMhWd3e1FmbgMcDBwC/ON0O5jtjekUXp+Z/cDOwOnAscAVERGtXEmbjbkjdcFreA1weN3zw4BfjDPttsz83xav+0fACUCr+5XUOubXGWizMXekLngN5yq/Pg64ANgD2B0YAv6thf2rARaePSAz7wK+A+wLEBG7RMTlxV6fVRFxymjbYs/pVyPiSxGxFjgxIraMiI9FxN3Fz8dG94RGxI4R8e2IeLDo74cRMa+Y96uIeH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C/+MUvuP7667n//vv5l3/5l9kOWZKktmZulaTu0bXneM62+vNQRi1atIg777xzw/M1a9awyy67ALDzzjsDsOWWW/KqV72Kj3zkI7MXrCRJHcDcKkndo2sLz0YvXFCmQw45hNtuu41f/vKX7Lrrrlx88cVcdNFFANxzzz3svPPOZCbf+MY32Hfffec4WpWt2dsRDA4OAsMb/W1XqyPMm9fX2PqXewNzSc0xt0qzb6afH4aGhujv7y8+P5RneHgYqLJgwU9n3slIdfzPKZngvXC7RpcWnq256l6zNttsM84991ye97znMTIywkknncQ+++zD0NAQxx9/PPfeey+ZyYEHHsj5558/1+FqVjSz8R9myfZVWPvYhnnedDfIq6tNrF9SbzO3SnNn+p8fFiwYAfrY8PmhJLf/BvZcD/FQk+uY8DPKpofXqzN1XeE5VzejXrdu3bjTjz76aI4++uhNpl911VVlh6Q2NdPbEVQqg7B2mIFz5m+YNjIyQl9fY994blj/Yk/tljQ95lZp7k3388PoN57jfX5opcryYVhdLeXzRWZuOIdbnc9PoJIkSZKkUll4SpIkSZJKZeEpSZIkSSqVhackSZIkqVQWnpIkSZKkUnXdVW2bvVfiRObqin6SJM01c6skqVldV3gCsLbFN8rddurLV/f19bHffvtteH7sscdy5plntjaOMR588EEuuugiXve6101ruXe/+91ss802nHHGGSVFJknqOubWSZlbJWly3Vl4AgPntOZG15XljSXarbbaipUrV7ZknY168MEH+cQnPjHt5ChJ0kyYWyVJM+U5niX6/e9/z9KlS7n11lsBOO6447jwwgsB2GabbTj99NM5+OCDOfLII7n33nsBuP322znqqKN4ylOewqGHHsovfvELAH7zm9/wkpe8hAMOOIADDjiAH//4x5x55pncfvvtHHjggbzlLW8B4KyzzuKQQw5h//33513veteGWD7wgQ+wdOlSnv3sZ2+IR5KkTmNulaTOZOHZIg899BAHHnjghp9LLrmEhQsXcu6553LiiSdy8cUX88ADD3DKKacA8Ic//IGDDz6YG2+8kcMPP5z3vOc9AJx66ql8/OMf54YbbuAjH/nIhj2uy5cv5/DDD+dnP/sZN954I/v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udz4Z4Enp/rn6+Li4uJy7otzq3Ori4vveJqNVy/pK6CPLAm8DtwEvBsRIxExDLwD3Jz6H4mI3lS/FuiJiF8je/tNJ3AL8AOwVNJrku4E/igXQESMkCWdeyRdTpYkB4t0bYqI42Wm6oqIE6k+D9ghaRB4CyisKVkJ7IzsyikR8Xu52MocI8DfwJ5U7yf756HgF7LEamZmtce5tTznVpv16qY6ALNp6EREXJXfkNaYlDKS71qsQ0Qck7QMuAN4HLgfWDdBHO3AM8BhYGeJPiclzYnSa1/ysbUBPwPLyN5m/1cu5sks9i73vfgnIgpz/cv//8bMB06MH2JmZjXAubU851ab9XzH06wynwKrJDVIagTuI1ujMtYB4FZJzZLmAquBTyQ1A3Mi4m3geeDqImOPAwsLjYg4ACwGHgDeKBHXt2RrTypxde1mlQAAATVJREFUPnA0JdI1wNy0fS+wTulT/yQ1FYtnomOsYP+XAYcqjNXMzGY/59YJjrGC/Tu32ozhE0+zCkTEANmakS/IkkN7RHxZpN9R4GmgGzgIDETEbuBioCe9zagj9RlrO/C+pO7ctjfJPrHuWInQ3gNuq/AwtgJrJfWSJaqRFPMHQBfQl+LblPp3ANsKH4BQwTFO5EbgowpjNTOzWc651bnVaosfp2I2jUnaA2yJiI9LfP0iYFdE3H5uI5scScuBjRGxZqpjMTOz2ubcajY1fMfTbBqStEjSd2RrYoomRhi9QrpD6SHX01gz2dugzMzMpoRzq9nU8h1PMzMzMzMzqyrf8TQzMzMzM7Oq8omnmZmZmZmZVZVPPM3MzMzMzKyqfOJpZmZmZmZmVeUTTzMzMzMzM6uq/wCVc7tcDbPoYQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "stdev1 = np.std(por1); stdev2 = np.std(por2)\n",
    "por1r05 = GSLIB.affine(por1,tmean=ci_95_por1[0],tstdev=stdev1)\n",
    "por1r95 = GSLIB.affine(por1,tmean=ci_95_por1[1],tstdev=stdev1)\n",
    "por2r05 = GSLIB.affine(por2,tmean=ci_95_por2[0],tstdev=stdev2)\n",
    "por2r95 = GSLIB.affine(por2,tmean=ci_95_por2[1],tstdev=stdev2)\n",
    "\n",
    "plt.subplot(121)\n",
    "plt.hist(por1r05, facecolor='yellow',bins=np.linspace(0.0,0.4,50),histtype=\"stepfilled\",alpha=0.8,density=True,cumulative=True,edgecolor='black',linewidth=2,label='P05')\n",
    "plt.hist(por1, facecolor='orange',bins=np.linspace(0.0,0.4,50),histtype=\"stepfilled\",alpha=0.8,density=True,cumulative=True,edgecolor='black',linewidth=2,label='Expected')\n",
    "plt.hist(por1r95, facecolor='red',bins=np.linspace(0.0,0.4,50),histtype=\"stepfilled\",alpha=0.8,density=True,cumulative=True,edgecolor='black',linewidth=2,label='P95')\n",
    "\n",
    "plt.xlim([0.0,0.4]); plt.ylim([0,1.0])\n",
    "plt.xlabel('Porosity (fraction)'); plt.ylabel('Cumulative Probability'); plt.title('Porosity Distribution Uncertainty - Well 1')\n",
    "plt.legend(loc='upper left')\n",
    "plt.grid(True)\n",
    "\n",
    "plt.subplot(122)\n",
    "plt.hist(por2r05, facecolor='yellow',bins=np.linspace(0.0,0.4,50),histtype=\"stepfilled\",alpha=0.8,density=True,cumulative=True,edgecolor='black',linewidth=2,label='P05')\n",
    "plt.hist(por2, facecolor='orange',bins=np.linspace(0.0,0.4,50),histtype=\"stepfilled\",alpha=0.8,density=True,cumulative=True,edgecolor='black',linewidth=2,label='Expected')\n",
    "plt.hist(por2r95, facecolor='red',bins=np.linspace(0.0,0.4,50),histtype=\"stepfilled\",alpha=0.8,density=True,cumulative=True,edgecolor='black',linewidth=2,label='P95')\n",
    "\n",
    "plt.xlim([0.0,0.4]); plt.ylim([0,1.0])\n",
    "plt.xlabel('Porosity (fraction)'); plt.ylabel('Cumulative Probability'); plt.title('Porosity Distribution Uncertainty - Well 2')\n",
    "plt.legend(loc='upper left')\n",
    "plt.grid(True)\n",
    "\n",
    "plt.subplots_adjust(left=0.0, bottom=0.0, right=2.0, top=1.2, wspace=0.2, hspace=0.3)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We just calculated a scenario-based uncertainty model for the porosity distribution around wells 1 and 2. Of course, we could actually sample porosity means continuously from our confidence calculation as we have access to the complete distribution for uncertainty in the mean porosity of both wells.\n",
    "\n",
    "Communicating uncertainty is powerful, but always remember to state the assumptions. For example, here we assumed:\n",
    "\n",
    "1. The population distribution of porosity for each well is Gaussian distributed\n",
    "2. That the samples are independent.\n",
    "3. The distribuiton dispersion and shape don't change as we vary the (account for uncertainty in the) mean."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "One can check the Excel file linked above with the confidence interval calculated by hand and confirm that this result is correct.\n",
    "\n",
    "#### Hypothesis Testing\n",
    "\n",
    "The confidence intervals help with uncertainty in the distributions of porosity.  Now let's try to figure out if:\n",
    "\n",
    "1. wells 1 and 2 drilled into the same type of rock? \n",
    "2. did something change between the 2 wells? \n",
    "3. different units are being compared between the 2 wells (issues with stratal correlation)?\n",
    "\n",
    "Now, let's try the t test, hypothesis test for difference in means.  This test assumes that the variances are similar along with the data being Gaussian distributed (see the course notes for more on this).  This is our test:\n",
    "\n",
    "\\begin{equation}\n",
    "H_0: \\mu_{X1} = \\mu_{X2}\n",
    "\\end{equation}\n",
    "\n",
    "\\begin{equation}\n",
    "H_1: \\mu_{X1} \\ne \\mu_{X2}\n",
    "\\end{equation}\n",
    "\n",
    "For the resulting t-statistic and p-value we run this command."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The t statistic is -2.981 and the p-value is 0.005\n"
     ]
    }
   ],
   "source": [
    "t_pooled, p_pooled = st.ttest_ind(por1,por2)\n",
    "print('The t statistic is ' + str(round(t_pooled,3)) + ' and the p-value is ' + str(round(p_pooled,3)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The p-value, $p$, is the symmetric interval probaiblity our outside.  In other words the $p$ reported is 2 x cumulative probaiblity of the t statistic applied to the sampling t distribution.  Another way to look at it, if one used the $\\pm t_{t_{statistic},.d.f}$ statistic as thresholds, $p$ is the probability being outside this symmetric interval. So we will reject the null hypothesis if $p \\lt \\alpha$.  From the p-value alone it is clear that we would **reject the null hypothesis** and **accept the alternative hypothesis** that the means are not equal.  \n",
    "\n",
    "In case you want to compare the t-statistic to t-critical, we can apply the inverse of the student's t distribution at $\\frac{\\alpha}{2}$ and $1-\\frac{\\alpha}{2}$ to get the upper and lower critcal values.       "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The t crical lower and upper values are [-2.02  2.02]\n"
     ]
    }
   ],
   "source": [
    "t_critical = st.t.ppf([0.025,0.975], df=len(por1)+len(por2)-2)\n",
    "print('The t crical lower and upper values are ' + str(np.round(t_critical,2)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can observe that, as expected, the t-statistic is outside the t-critcal interval.  These results are exactly what we got when we worked out the problem by hand in Excel, but so much more efficient!  \n",
    "\n",
    "Now let's try the t-test, hypothesis test for difference in means allowing for unequal variances, this is also known as the Welch's t test.  All we have to do is set the parameter 'equal_var' to false, note it defaults to true (e.g. the command above). "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Ttest_indResult(statistic=-2.9808897468855644, pvalue=0.005502572350112333)"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "st.ttest_ind(por1, por2, equal_var = False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Once again we can see by $p$ that we will clearly reject the null hypothesis.  \n",
    "\n",
    "Let's now compare the variances with the F-test for difference in variances.  \n",
    "\n",
    "\\begin{equation}\n",
    "H_0: \\sigma^{2}_{X2} \\le \\sigma^{2}_{X1}\n",
    "\\end{equation}\n",
    "\n",
    "\\begin{equation}\n",
    "H_1: \\sigma^{2}_{X2} \\gt \\sigma^{2}_{X1}\n",
    "\\end{equation}\n",
    "\n",
    "Note, by ordering the variances we eliminate the case of $\\sigma^{2}_{X2} \\lt \\sigma^{2}_{X1}$.\n",
    "\n",
    "Details about the test are available in the course notes (along with assumptions such as Gaussian distributed) and this example is also worked out by hand in the linked Excel workbook.  We can accomplish the F-test in with SciPy.Stats the function with one line of code if we calculate the ratio of the sample variances ensuring that the larger variance is in the numerator and get the degrees of freedom using the len() command, ensuring that we are consistent with the numerator degrees of freedom set as 'dfn' and the denominator degrees of freedom set as 'dfd'.  We take a p-value of $1-p$ since the test is configured to be a single, right tailed test.    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The p-value for the F-test for difference is variances is 0.019\n"
     ]
    }
   ],
   "source": [
    "p_value = 1 - st.f.cdf(np.var(por2)/np.var(por1), dfn=len(por2)-1, dfd=len(por1)-1)\n",
    "print('The p-value for the F-test for difference is variances is ' + str(round(p_value,3)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Once again we would clearly reject the null hypothesis since $p \\lt alpha$ and assume that the variances are not equal.  Note this is a single tail test so our p-critical is 0.05 for a 95% confidence level.\n",
    "\n",
    "#### Reporting the Hypothesis Test Results\n",
    "\n",
    "The difference in the means and variances were tested for statistical significance for porosity measured in wells 1 and 2.  In all cases we rejected the null hypotheses and adopted the alternative hypotheses that the porosity distributions' means and variances for well 1 and 2 are statistically significant in their differences. It is possible that Well 1 and 2 have drilled into different rock units or have encountered nonstationary behavoirs in a single rock unit. This result may be applied to update subsurface maps and consider a difference in the subsurface at each well for development decision making."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Comments\n",
    "\n",
    "We are just scratching the surface for the application of confidence intervals and hypothesis tests to subsurface modeling.  Once again, there are a lot of details left out of the problem formulation and assumptions, see the course notes for more coverage.  By running the same confidence interval and hypothesis tests: 1) by hand in Excel and with 2) R and now here in 3) Python code, I hope this demonstration will enable and encourage more engineers and scientists to make these R and Python tools part of their common practice. I'm always happy to discuss,\n",
    "\n",
    "I hope this was helpful,\n",
    "\n",
    "*Michael*\n",
    "\n",
    "#### The Author:\n",
    "\n",
    "### Michael Pyrcz, Associate Professor, University of Texas at Austin \n",
    "*Novel Data Analytics, Geostatistics and Machine Learning Subsurface Solutions*\n",
    "\n",
    "With over 17 years of experience in subsurface consulting, research and development, Michael has returned to academia driven by his passion for teaching and enthusiasm for enhancing engineers' and geoscientists' impact in subsurface resource development. \n",
    "\n",
    "For more about Michael check out these links:\n",
    "\n",
    "#### [Twitter](https://twitter.com/geostatsguy) | [GitHub](https://github.com/GeostatsGuy) | [Website](http://michaelpyrcz.com) | [GoogleScholar](https://scholar.google.com/citations?user=QVZ20eQAAAAJ&hl=en&oi=ao) | [Book](https://www.amazon.com/Geostatistical-Reservoir-Modeling-Michael-Pyrcz/dp/0199731446) | [YouTube](https://www.youtube.com/channel/UCLqEr-xV-ceHdXXXrTId5ig)  | [LinkedIn](https://www.linkedin.com/in/michael-pyrcz-61a648a1)\n",
    "\n",
    "#### Want to Work Together?\n",
    "\n",
    "I hope this content is helpful to those that want to learn more about subsurface modeling, data analytics and machine learning. Students and working professionals are welcome to participate.\n",
    "\n",
    "* Want to invite me to visit your company for training, mentoring, project review, workflow design and / or consulting? I'd be happy to drop by and work with you! \n",
    "\n",
    "* Interested in partnering, supporting my graduate student research or my Subsurface Data Analytics and Machine Learning consortium (co-PIs including Profs. Foster, Torres-Verdin and van Oort)? My research combines data analytics, stochastic modeling and machine learning theory with practice to develop novel methods and workflows to add value. We are solving challenging subsurface problems!\n",
    "\n",
    "* I can be reached at mpyrcz@austin.utexas.edu.\n",
    "\n",
    "I'm always happy to discuss,\n",
    "\n",
    "*Michael*\n",
    "\n",
    "Michael Pyrcz, Ph.D., P.Eng. Associate Professor The Hildebrand Department of Petroleum and Geosystems Engineering, Bureau of Economic Geology, The Jackson School of Geosciences, The University of Texas at Austin\n",
    "\n",
    "#### More Resources Available at: [Twitter](https://twitter.com/geostatsguy) | [GitHub](https://github.com/GeostatsGuy) | [Website](http://michaelpyrcz.com) | [GoogleScholar](https://scholar.google.com/citations?user=QVZ20eQAAAAJ&hl=en&oi=ao) | [Book](https://www.amazon.com/Geostatistical-Reservoir-Modeling-Michael-Pyrcz/dp/0199731446) | [YouTube](https://www.youtube.com/channel/UCLqEr-xV-ceHdXXXrTId5ig)  | [LinkedIn](https://www.linkedin.com/in/michael-pyrcz-61a648a1)\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
